/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication1;
public class JavaApplication1 {
    public static void main(String[] args) {
        Super_A a=new Sub_A();
        a.method_A();
        System.out.println(" "+a.i);
    }
}
class Super_A{
    public int i=1;
    public void method_A(){
        System.out.println("this is Super_A");
    }
}
class Sub_A extends Super_A{
    public int i=2;
    public void method_A(){
        System.out.println("this is Sub_A");
    }
    public void method_B(){
        System.out.println("this is m_b");
    }
}